package cc.mrbird.febs.pedometer.entity;

import java.util.Date;

import cc.mrbird.febs.common.converter.TimeConverter;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wuwenze.poi.annotation.Excel;
import com.wuwenze.poi.annotation.ExcelField;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 鸡批次 Entity
 *
 * @author li
 * @date 2020-01-31 11:40:37
 */
@Data
@TableName("batches")
@Excel("鸡批次表")
public class Batches {

    /**
     * 批次id
     */
    @TableId(value = "batches_id", type = IdType.AUTO)
    @ExcelField(value = "角色编号")
    private Integer batchesId;

    /**
     * 获得检疫合格证日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy年MM月dd日")
    @ExcelField(value = "检疫日期", writeConverter = TimeConverter.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField("credential_date")
    private Date credentialDate;

    /**
     * 检疫合格证图片
     */
    @TableField(value = "file")
    @ExcelField(value = "证书图片url")
    private String file;

    /**
     * 
     */
    @TableField("create_time")
    private Date createTime;

    /**
     * 出生地址
     */
    @ExcelField(value = "出生地址")
    @TableField("address")
    private String address;

    /**
     * 品种
     */
    @ExcelField(value = "品种")
    @TableField("type_name")
    private String typeName;

    /**
     * 品种
     */
    @ExcelField(value = "品种")
    @TableField("type")
    private Integer type;

    /**
     * 出生日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy年MM月dd日")
    @TableField("birthday")
    @ExcelField(value = "出生日期", writeConverter = TimeConverter.class)
    private Date birthday;

    /**
     * 上环日期
     */
    @ExcelField(value = "上环日期", writeConverter = TimeConverter.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy年MM月dd日")
    @TableField("mark_date")
    private Date markDate;

    /**
     * 数量
     */
    @ExcelField(value = "数量")
    @TableField("number")
    private Integer number;
}
